<template>
	<view class="content">
		<view class="header">
			<view :style="{height: systemBarHeight + 'px'}">
			</view>
			<view class="navbar">
				<image src="/static/xy/fh.png" mode="" @click="fh()"></image>
				<text>我的课目</text>
			</view>
		</view>

		<view class="list">
			<view class="list_item" v-for="(item,index) in List" :key="index">
				<view class="list_item1">
					<text>{{item.km}}</text>
				</view>
				<view class="list_item2">
					<text>{{item.tit}}</text>
				</view>
				<view class="list_item3">
					<text class="starts1" v-if="item.starts==false">合格</text>
					<text class="starts2" v-if="item.starts==true">不合格</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				systemBarHeight: 0,
				List: [{
						km: '科目二',
						tit: '2024-01-10科目三考试',
						starts: false
					},
					{
						km: '科目二',
						tit: '2024-01-10科目三考试',
						starts: false
					},
					{
						km: '科目二',
						tit: '2024-01-10科目三考试',
						starts: true
					},
					{
						km: '科目二',
						tit: '2024-01-10科目三考试',
						starts: false
					},
					{
						km: '科目二',
						tit: '2024-01-10科目三考试',
						starts: false
					}
				]
			}
		},
		mounted() {
			/* 手机顶部高度 */
			this.getSysteminfo()
		},
		methods: {
			/* 手机顶部高度 */
			getSysteminfo() {
				uni.getSystemInfo({
					success: res => {
						this.systemBarHeight = res.statusBarHeight;
					}
				});
			},
			fh() {
				uni.navigateBack({
					delta: 1
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		width: 750rpx;
		height: 1624rpx;
		background: #F5F5F5;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.header {
		background: #FFFFFF;
	}

	.navbar {
		height: 88rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		position: relative;

		>image {
			width: 48rpx;
			height: 48rpx;
			position: absolute;
			left: 32rpx;
		}

		>text {

			font-family: PingFang SC, PingFang SC;
			font-weight: 600;
			font-size: 34rpx;
			color: #43484D;

		}
	}

	.list {
		padding-top: 46rpx;

		.list_item {
			width: 92%;
			height: 112rpx;
			background: #FFFFFF;
			border-radius: 16rpx 16rpx 16rpx 16rpx;
			margin: 0 auto 16rpx;
			display: flex;
			align-items: center;

			.list_item1 {
				margin-left: 32rpx;
				width: 82rpx;
				height: 36rpx;
				background: #E7FFF6;
				border-radius: 4rpx 4rpx 4rpx 4rpx;
				border: 2rpx solid #53DDA8;
				display: flex;
				align-items: center;
				justify-content: center;
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 22rpx;
				color: #53DDA8;

			}

			.list_item2 {

				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 28rpx;
				color: #43484D;
				margin-left: 8rpx;
			}
			.list_item3{
				margin-left: auto;
				margin-right: 32rpx;
				
				.starts1{
					
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 28rpx;
					color: #22B42B;
					
				}
				.starts2{
					
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					font-size: 28rpx;
					color: #ED4141;
					
				}
			}
		}
	}
</style>